package com.yc.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 设备
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BloodSugarEquipment对象", description="设备")
public class BloodSugarEquipment extends Model<BloodSugarEquipment> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "设备表主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "设备编号")
    @NotBlank(message = "设备编号不能为空")
    private String equipmentCode;

    @ApiModelProperty(value = "设备所属科室")
    @NotNull(message = "科室id不能为空")
    private Integer departmentId;

    @ApiModelProperty(value = "设备mac地址")
    @NotBlank(message = "mac地址不能为空")
    private String mac;

    @ApiModelProperty(value = "设备状态 0:未测  1:已测")
    private String type;

    @ApiModelProperty(value = "设备创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "设备信息更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
